
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author:		<Agurto, Jorge>
-- Create date: <05/11/2011>
-- =============================================
CREATE PROCEDURE [GOOGLECODERS].PostnetBeneficiarioInsert
	@QueryUnions varchar(8000) = ''
AS
BEGIN
	DECLARE @TableAux TABLE ( 
	IdPostnet INT NOT NULL, 
	IdBeneficiario INT NOT NULL)

	INSERT INTO @TableAux (IdPostnet, IdBeneficiario) 
	EXEC(@QueryUnions)

	INSERT INTO [GOOGLECODERS].[Postnet_x_Beneficiario]
	SELECT IdPostnet, IdBeneficiario FROM @TableAux
END
GO